﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Gui/masterPage.Master" AutoEventWireup="true" CodeBehind="ManagerOrder.aspx.cs" Inherits="OnlineStore.Gui.ManagerOrder" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentLogin" runat="server">
<asp:HyperLink ID="HL_tab_login" runat="server"  NavigateUrl="/gui/Login.aspx" ForeColor="Red">(Đăng nhập) </asp:HyperLink> |
    <asp:HyperLink ID="HL_tab_Logout" runat="server" Visible="false" NavigateUrl="/gui/Login.aspx?logout=true">Đăng Xuất | </asp:HyperLink>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentCartRight" runat="server">
<asp:GridView ID="ListCartRight" runat="server" AutoGenerateColumns="False" 
           GridLines="None">
            <Columns>
                <asp:BoundField DataField="NumberOrder" SortExpression="NumberOrder" 
                    DataFormatString="{0} x " >
                
                <ControlStyle Width="10px" />
                </asp:BoundField>
                
                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                    DataTextField="Product_Name" 
                    DataNavigateUrlFormatString="/gui/ProductDetail.aspx?id={0}" />
            </Columns>
        </asp:GridView>
    <br />
    <table cellpadding="0" cellspacing="0" align="right" style="display:inline-block;">
     <tbody>
        <tr>
            <td align="right"><span class="cart_module_total"><b>Tiền hàng:</b></span></td>
            <td align="right">
                <asp:Label ID="lb_Sum_product" runat="server" CssClass="cart_module_total" >0 VNĐ</asp:Label>
             </td>
        </tr>
        <tr>
            <td align="right"><span class="cart_module_total"><b>Tổng cộng:</b></span></td>
            <td align="right"><span class="cart_module_total">
                <asp:Label ID="lb_Sum" runat="server" CssClass="cart_module_total">0 VNĐ</asp:Label></span></td>
        </tr>
     </tbody></table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentTitle" runat="server">
<h1> Thông tin đơn hàng</h1>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentCenter" runat="server">
    
<div style="background: #F7F7F7; border: 1px solid #DDDDDD; padding: 10px; margin-bottom: 10px;">
<%  
    if (lb_title.Visible == true)
    {
%>
    <asp:Label ID="lb_title" runat="server" CssClass="warning" Visible="false" Text="Không tìm thấy Đơn đặt hàng"></asp:Label>
<%}
    else
    {%>
    <table class="cart"><tbody>
    <tr>
    <td ><b>Hóa Đơn</b></td>
    <td>
        <asp:Label ID="lb_HoaDon" runat="server" Text="A01"></asp:Label></td>
    <td></td>
    <td><b>Ngày giao</b></td>
    <td rowspan="7">
        <asp:Calendar ID="Delivery_Date" runat="server" BackColor="White" 
            BorderColor="#999999" CellPadding="4" DayNameFormat="Shortest" 
            Font-Names="Verdana" Font-Size="8pt" ForeColor="Black" Height="180px" 
            Width="200px">
            <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
            <NextPrevStyle VerticalAlign="Bottom" />
            <OtherMonthDayStyle ForeColor="#808080" />
            <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
            <SelectorStyle BackColor="#CCCCCC" />
            <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
            <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
            <WeekendDayStyle BackColor="#FFFFCC" />
        </asp:Calendar>
    </td>
    </tr>
    <tr>
    <td><b>Tên khách hàng : </b></td>
    <td>
        <asp:Label ID="lb_Name" runat="server" Text="Tên"></asp:Label>
        </td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td><b>Điện thoại : </b></td>
    <td>
        <asp:Label ID="lb_Tel" runat="server" Text="SDT"></asp:Label>
        </td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td><b>Giá trị : </b></td>
    <td>
        <asp:Label ID="lb_Total" runat="server" Text="tiền"></asp:Label>
        </td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td><b>Status : </b></td>
    <td align="left">
        <asp:DropDownList ID="boxStatus" runat="server">
            <asp:ListItem>Processing</asp:ListItem>
            <asp:ListItem>Finish</asp:ListItem>
            <asp:ListItem>Error</asp:ListItem>
        </asp:DropDownList>
        </td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td><b>VouCher</b></td>
    <td>
        <asp:Label ID="lb_VoucherID" runat="server" Text="Voucher"></asp:Label>
        </td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td><b>Địa chỉ : </b></td>
    <td>
        &nbsp;</td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td colspan="5">
        <asp:TextBox ID="tb_Address" runat="server" Rows="4" TextMode="MultiLine" 
            Width="257px"></asp:TextBox>
        </td>
    </tr>
    </tbody></table>
<%} %>
<asp:Label ID="lb_warning" runat="server" CssClass="warning" Visible="false" Text="Vui Lòng nhập Kiểm tra lại  thông tin"></asp:Label>
</div>
<div class="buttons">
<table><tbody>
    <tr>
        <td style="width:20px"></td>
        <td style="width:75px;" align="center">
            <asp:LinkButton  ID="hl_Cancel" runat="server" CssClass="button1" Width="75px" 
                onclick="onCancel"><span>Hủy</span></asp:LinkButton>
        </td>
        <td style="width:210px"></td>
        <td style="width:75px" align="center">
            <asp:LinkButton  ID="hl_Submit" runat="server" CssClass="button1" Width="75px" 
                onclick="onSubmit"><span>lưu</span></asp:LinkButton>
         </td>
        <td></td>
    </tr>
</tbody></table>
</div>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="ContentTop" runat="server">
    <h1>Chi tiết đơn hàng</h1>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GV_ListOrderDetail" runat="server" AutoGenerateColumns="False" 
        CssClass="cart" GridLines="None">
        <Columns>
            <asp:ImageField DataImageUrlField="Picture" 
                DataImageUrlFormatString="../../img/{0}" HeaderText="Hình">
                <ControlStyle Width="75px" />
            </asp:ImageField>
            <asp:HyperLinkField DataNavigateUrlFields="Product_ID" 
                DataNavigateUrlFormatString="/Gui/ProductDetail.aspx?id={0}" 
                DataTextField="Product_Name" HeaderText="Tên" />
            <asp:BoundField DataField="Type" HeaderText="Loại" SortExpression="Type" />
            <asp:BoundField DataField="NumberOrder" HeaderText="Số lượng" 
                SortExpression="NumberOrder" />
            <asp:BoundField DataField="PriceProduct" HeaderText="Đơn giá" 
                SortExpression="PriceProduct" DataFormatString="{0:0,0 VNĐ}" />
            <asp:BoundField DataField="Sum" HeaderText="Tổng" SortExpression="Sum" 
                DataFormatString="{0:0,0 VNĐ}" />
        </Columns>
    </asp:GridView>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="ContentButtom" runat="server">
<h1>Danh sách các đơn đặt hàng</h1>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="Contentlist" runat="server">

    <asp:GridView ID="GV_ListOrder" runat="server" AutoGenerateColumns="False" 
        CssClass="cart" AllowPaging="True" 
        onpageindexchanging="GV_ListOrder_PageIndexChanging" PageSize="5" 
        GridLines="None">
        <Columns>

            <asp:HyperLinkField DataNavigateUrlFields="Order_Id" 
                DataNavigateUrlFormatString="/Gui/ManagerOrder.aspx?id={0}" 
                DataTextField="Order_Id" HeaderText="Hóa đơn" />
            <asp:BoundField DataField="Customer_ID" HeaderText="Khách Hàng" 
                SortExpression="Customer_ID" />
            <asp:BoundField DataField="Status" HeaderText="Status" 
                SortExpression="Status" />
            <asp:BoundField DataField="Total" HeaderText="Giá trị" SortExpression="Total" />
            <asp:BoundField DataField="Voucher_ID" HeaderText="Voucher" 
                SortExpression="Voucher_ID" />
            <asp:BoundField DataField="Created_Date" HeaderText="Ngày Tạo" 
                SortExpression="Created_Date" />
        </Columns>
    </asp:GridView>

</asp:Content>
